import {Role} from "../../../../gcg/libs/role/role/Role.js";
import {CompeteConstant} from "../../../../gcg/libs/constants/CompeteConstant.js";
import {Container} from "../../../../gcg/libs/container/Container.js";

export class FriendSquare {
    init(roleElement){
        //初始化友军对象
        let role = new Role();
        role.compete = CompeteConstant.FRIEND;
        role.setNickname();//可选
        role.setTop(roleElement, role.getHeight(Container.class)-role.getHeight(roleElement));
        role.setLeft(roleElement, role.getAllWidth(Container.class)/2-role.getAllWidth(roleElement)/2);

        role.setDirection(roleElement, 'down');
        role.init(roleElement);

        //设置fire默认值top/left
        //设置top[跟随友军本体top]
        this.setFireTop(role.getTop(roleElement));
        //设置left[跟随友军本体中间]

        return role;
    }

    setFireTop(){

    }
}